package behaviour.gui;

import jade.core.AID;
import jade.core.behaviours.OneShotBehaviour;
import jade.lang.acl.ACLMessage;

public class AnotherRequestStartStopBehaviour extends OneShotBehaviour {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3634544090128150911L;
	boolean start;
	
	public AnotherRequestStartStopBehaviour(boolean start) {
		this.start = start;
	}
	
	@Override
	public void action() {
		String content = "";
		if(start)
			content = "start";
		else
			content = "stop";

		ACLMessage msg = new ACLMessage(ACLMessage.REQUEST);
		msg.addReceiver(new AID("creator", AID.ISLOCALNAME));
		msg.setConversationId("another-start-stop");
		msg.setContent(content);
		myAgent.send(msg);
	}

}
